package ${package}.${bottomName}.dto.resp;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.xiangxiang.support.common.excel.InstantConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import java.io.Serializable;
<#if hasInstant?? && hasInstant>
import java.time.Instant;
</#if>
<#if hasBigDecimal?? && hasBigDecimal>
import java.math.BigDecimal;
</#if>

/**
* ${comments}导出结果
* @author ${author}
* @date ${datetime}
* 邮箱=-> ${email}
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "${comments}导出结果")
public class Excel${className}Resp implements Serializable {

	private static final long serialVersionUID = 1L;

<#if columns?? &&columns?size gt 0>
	<#list columns as column>
	/**
	* ${column.comments}
	*/
	@ColumnWidth(50)
		<#if column.nullAble?? && column.nullAble=='true'>
	@ApiModelProperty(value = "${column.comments}",required = true)
		<#else>
	@ApiModelProperty(value = "${column.comments}")
		</#if>
		<#if column.attrType?? && column.attrType=='Instant'>
	@ExcelProperty(value = "${column.comments}",converter = InstantConverter.class)
		<#else>
	@ExcelProperty("${column.comments}")
		</#if>
	<#if column.defaultValue?? && column.defaultValue!=null >
	<#if column.attrType?? && column.attrType=='String'>
	private ${column.attrType} ${column.attrname} ="${column.defaultValue}";
	<#elseif column.attrType?? && column.attrType=='Date' && column.defaultValue=='CURRENT_TIMESTAMP'>
	private ${column.attrType} ${column.attrname} =new Date();
	<#elseif column.attrType?? && column.attrType=='Instant' && column.defaultValue=='CURRENT_TIMESTAMP'>
	private ${column.attrType} ${column.attrname} =Instant.now();
	<#elseif column.attrType?? && column.attrType=='BigDecimal' && column.defaultValue!=null>
	private ${column.attrType} ${column.attrname} =new BigDecimal(${column.defaultValue});
	<#else>
	private ${column.attrType} ${column.attrname} =${column.defaultValue};
	</#if>
	<#else>
	private ${column.attrType} ${column.attrname};
	</#if>
	</#list>
</#if>
}
